package com.common;

import beans.Log;
import org.springframework.jdbc.core.support.JdbcDaoSupport;

/**
 * Created by xiang on 2017/7/9.
 */
public class SpringLogTool extends JdbcDaoSupport {
    public void insertIntoDataLog(Log log) {
        String sql = "INSERT INTO DataLog VALUES (?,?,?,?,?,?)";
        getJdbcTemplate().update(sql, log.getId(), log.getUserId(), log.getOperation(), log.getOperateTime()
                , log.getTableName(), log.getRowCount());
    }
}
